import Monent from 'moment'

/**
 *
 * @param date
 * @param format
 * @returns {*}
 */
export function dateFormat (date, format) {
  format = format || 'YYYY-MM-DD'
  return Monent(date).format(format)
}

export function dateTimeFormat (date, format) {
  format = format || 'YYYY-MM-DD HH:mm:ss'
  return Monent(date).format(format)
}
